﻿#ifndef DIRMGR_H
#define DIRMGR_H

#include "../sys_h/DATATYPE.h"
#include "../sys_h/DATATYPE_S.h"
#include "SYS_DIR_DEF.h"
#include "../sys_h/SYS_VER.h"
#include <QObject>
#include <QString>
#include <QSharedMemory>
class DirMgr:public QObject
{
	Q_OBJECT
public:
    DirMgr();
    ~DirMgr();

public:
    static int init(bool isForceRefresh);
	static void f_init();
	static XBOOL read_cfg_file();
	static XBOOL set_cfg_file();
	static void change_dir(XUINT dir_val,QString new_dir);

	static void init_p_en_dir();

    static QString getdir(XUINT type);
    /*
    锟斤拷锟斤拷目录锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
    */
    static XString GetSysDirCh_Name(XUINT dir_val);
    /*
    锟斤拷锟斤拷目录锟斤拷英锟斤拷锟斤拷锟斤拷
    */
    static XString GetSysDirEn_Name(XUINT dir_val);
    /*
    锟斤拷锟斤拷指锟斤拷目录锟侥撅拷锟斤拷路锟斤拷
    */
    static XString GetSysDirAllEn_Name(XUINT dir_val);
    /*
    锟斤拷锟斤拷指锟斤拷目录
	*/
	static XString GetSysDirTrue_Name(XUINT dir_val);
	/*
	锟斤拷锟斤拷指锟斤拷目录
	*/
    static XINT    CreateNSA3000TSysDir(XUINT dir_val);
    /*
    锟斤拷锟斤拷锟斤拷锟斤拷目录
    */
    static XVOID   CreateAllNSA3000TSysDir();
    /*
    锟斤拷锟斤拷RD锟侥硷拷路锟斤拷
    */
    static XString GetSys_RD_SM_FILE_PATH();
    /*
    锟斤拷锟斤拷SS锟侥硷拷路锟斤拷
    */
    static XString GetSys_SS_SM_FILE_PATH();
    /*
    锟斤拷锟斤拷DS锟侥硷拷路锟斤拷
    */
	static XString GetSys_MM_SM_FILE_PATH();
    static XString GetSys_DS_SM_FILE_PATH();
    /*
    锟斤拷锟斤拷NM锟侥硷拷路锟斤拷

    */
    static XString GetSys_NM_SM_FILE_PATH();

	static XString GetSys_LM_SM_FILE_PATH();

	static XString GetSys_RG_SM_FILE_PATH();

public:
	static void readFromMemory();
	static void writeToMemory();
	static void initializeMemory(bool isForceRefresh);

private:
	static void cleanMemory();
	static bool isMemoryClear();
	static void checkMemorySize(QString);
};

#endif // DIRMGR_H
